<?php


class Food_element extends CI_Model{
		
	
	public  function new_food_element($id_food,$out_diet){
		$id_diet	= (int) $this->input->post('id_diet');
		$id_time	= (int) $this->input->post('id_time');
		$amount		= (int) $this->input->post('amount');
		
		$data = array(
			'id_diet' => $id_diet ,
			'id_food' => $id_food ,
			'id_time' => $id_time ,
			'amount' => $amount,
			'out_diet' => $out_diet
		);
		$this->db->insert('food_element', $data);
		return $this->db->insert_id();
	}
	
	
	
}


?>
